using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Fan.Dongping.Common;
using System.Globalization;
using System.Threading;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Culture"] != null)
        {
            Label2.Text = Session["Culture"] as string;
        }

    }

    protected override void InitializeCulture()
    {

        if (Session["Culture"] != null)
        {
            string UserCulture = Session["Culture"] as string;
           
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(UserCulture);
            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(UserCulture);
        }

    }

    protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        //Profile.LanguagePreference = RadioButtonList1.SelectedValue;

        Session.Add("Culture", RadioButtonList1.SelectedValue);
        Response.Redirect(this.Request.Url.AbsolutePath);

    }
}
